from ..models import Profile
from dvadmin.utils.viewset import CustomModelViewSet
from ...utils.serializers import CustomModelSerializer


class ProfileSerializer(CustomModelSerializer):
    class Meta:
        model = Profile
        fields = '__all__'
    
    def create(self, validated_data):

        return super().create(validated_data)


class ProfileViewSet(CustomModelViewSet):
    filter_fields = ["id", "name"]
    queryset = Profile.objects.all()
    serializer_class = ProfileSerializer
    create_serializer_class = ProfileSerializer